SameSite

Represents the SameSite cookie attribute values of the `Set-Cookie` HTTP response header. It allows declaring in which context cookies can be sent.

Entries

Link copied to clipboard

The cookie can only be sent in a first-party context, when the cookie matches the domain of the current site.

Link copied to clipboard

The cookie can be sent with top-level navigations from a third-party site to the web site with the domain matching the cookie. This is the default value in modern browsers.

Link copied to clipboard

The cookie can be sent in a third-party context. To use this mode the cookie must also be marked as secure.

Functions

Link copied to clipboard
open fun valueOf(name: String): SameSite

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard
open fun values(): Array<SameSite>

Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants.